//
//  DMView.m
//  Cook
//
//  Created by 0.0 on 15-4-15.
//  Copyright (c) 2015年 dingjun. All rights reserved.
//

#import "DMView.h"

@implementation DMView

- (void)dealloc
{
    [_dMLabel release];
    [_dMImageView release];
    
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        self.dMLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width / 3, self.frame.size.height / 3)];
    
        self.dMImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)];
        
        _dMImageView.layer.borderWidth = 0.05f;
        _dMImageView.layer.shadowOffset = CGSizeMake(0, 0);
        _dMImageView.layer.shadowColor = [UIColor grayColor].CGColor;
        _dMImageView.layer.shadowOpacity = 0.8;
        _dMImageView.layer.shadowRadius = 5.0f;
        
        [self addSubview:_dMImageView];
        [self addSubview:_dMLabel];

        [_dMLabel release];
        [_dMImageView release];
    }
    
    return self;
}

@end
